﻿namespace EyeOpen.Web.Security
{
    using System.Linq;
    using EyeOpen.Dependency;
    using EyeOpen.SecurityService;

    public class DependencyRoleProvider : FakeRoleProvider
    {
        public override string[] GetRolesForUser(string username)
        {
            return 
                DependencyContainer
                .Resolve<IRoleSecurityService>()
                .GetRoleForUser(username)
                .ToArray();
        }
    }
}